//
//  HLUserDetailTagCell.m
//  YueYue
//
//  Created by hulu001 on 2023/5/18.
//

#import "HLUserDetailTagCell.h"

@interface HLUserDetailTagCell ()

@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subTitleLabel;
@property (nonatomic, strong) UIImageView *arrowView;

@end

@implementation HLUserDetailTagCell


-(instancetype)initWithFrame:(CGRect)frame{
    
    if ([super initWithFrame:frame]) {
        self.contentView.backgroundColor = HLBackgroundColor;
        self.contentView.layer.masksToBounds = YES;
        self.contentView.layer.cornerRadius = 4;
        [self setupView];
    }
    return self;
    
}

- (void)setupView {
    self.iconView = [[UIImageView alloc] init];
    _iconView.layer.masksToBounds = YES;
    _iconView.layer.cornerRadius = 16;
    _iconView.backgroundColor = HLMainColor;
    _iconView.contentMode = UIViewContentModeCenter;
    _iconView.image = UIImageMake(@"user_detail_wealth");
    [self.contentView addSubview:_iconView];
    [_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(32);
        make.left.mas_equalTo(12);
        make.top.mas_equalTo(16);
        make.bottom.mas_equalTo(-16);
    }];
    
    self.titleLabel = [[UILabel alloc] init];
    _titleLabel.font = UIFontMediumMake(12);
    _titleLabel.textColor = UIColorBlack;
    _titleLabel.text = @"Lv32";
    [self.contentView addSubview:_titleLabel];
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_iconView.mas_right).offset(12);
        make.top.equalTo(_iconView);
    }];
    
    self.subTitleLabel = [[UILabel alloc] init];
    _subTitleLabel.font = UIFontMake(10);
    _subTitleLabel.textColor = HLTextColor3;
    _subTitleLabel.text = @"财富等级";
    [self.contentView addSubview:_subTitleLabel];
    [_subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_titleLabel);
        make.bottom.equalTo(_iconView);
    }];
    
    self.arrowView = [[UIImageView alloc] init];
    _arrowView.image = UIImageMake(@"user_detail_tag_arrow");
    [self.contentView addSubview:_arrowView];
    [_arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(0);
        make.right.mas_equalTo(-12);
    }];
    
}

@end
